package com.base.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * 患者主索引合并定时任务
 * @author wnhuang
 * @Package com.base.api
 * @date 2021-02-24 16:45
 */
@Component
public class EmpiMergeTask implements ScheduledOfTask{

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    EmpiMergeInfoService empiMergeInfoService;
    /**
     * 定时任务方法
     */
    @Override
    public void execute() {
        String batchId = UUID.randomUUID().toString();
        empiMergeInfoService.callable(batchId);
        logger.info("定时任务执行了患者主索引生成，批次号：{}",batchId);
    }
}
